package com.kotlinvben.enumeration

enum class Gender(val code: String, val description: String) {
    MALE("M", "男"),
    FEMALE("F", "女"),
    UNKNOWN("U", "未知");

    companion object {
        fun fromCode(code: String): Gender {
            return entries.find { it.code == code } ?: UNKNOWN
        }
    }
} 